// 导入库初始化函数
import LibInit from '../lib/LibInit';
// 导入asasai模块（前置必须的模块，先加载）
// import asasai from '../lib/asinstallasai/as-asinstallasai-file.mjs';
// import '../lib/asinstallasai/as-asinstallasai-file.css';
import asasai from '../lib-install/index';
import asasailib from '../lib/index';

// 导入astestkdd模块
// import astestkdd from '../testkdd/lib/index';
import astestkdd from '../testkdd/lib-install/index';
import askududu from '../kududu/lib-install/index';
import asnovel from '../novel/lib-install/index';
import asblog from '../blog/lib-install/index';
// 导入Vue的App类型
import type { App } from 'vue';

export default {
    install(app: App) {
        const { lib } = LibInit();
        asasai.install(app, lib); // 先VUE加载组件
        asasailib.install(app, lib); // 先VUE加载组件
        const models: any = {
            astestkdd,
            askududu,
            asnovel,
            asblog,
        };
        app.config.globalProperties.$installplugs = (webtype: any) => {
            models['as' + webtype]?.forEach((el: any) => {
                el.install(app, lib);
            });
        };
    },
};
